/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.base.entity.fixedexpense;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.base.entity.supplier.Supplier;
import org.hibernate.validator.constraints.Length;

/**
 * 固定费用项目Entity
 * @author Kilo
 * @version 2021-03-02
 */
@Table(name="t_vehicle_settlement_info", alias="a", columns={
		@Column(name="vehicle_settlement_info_id", attrName="vehicleSettlementInfoId", label="车辆结算信息ID", isPK=true),
		@Column(name="investor", attrName="investor", label="结算资方"),
		@Column(name="if_investor", attrName="ifInvestor", label="是否资方结算项目"),
		@Column(name="if_customer", attrName="ifCustomer", label="是否客户结算项目"),
		@Column(name="remarks", attrName="remarks", label="备注", queryType=QueryType.LIKE),
		@Column(name="expense_item_id", attrName="expenseItemId.fixedExpenseId", label="费用项目ID"),
	}, joinTable={
		@JoinTable(type=Type.LEFT_JOIN, entity= Supplier.class, attrName="supplier", alias="u11",
				on="u11.supplier_id = a.investor", columns={
				@Column(name="supplier_id", label="供应商编码", isPK=true),
				@Column(name="supplier_name", label="供应商名称", isQuery=false),
		}),
	},orderBy="a.vehicle_settlement_info_id ASC"
)
public class VehicleSettlementInfo extends DataEntity<VehicleSettlementInfo> {
	
	private static final long serialVersionUID = 1L;
	private String vehicleSettlementInfoId;		// 车辆结算信息ID
	private String investor;		// 结算资方
	private String ifInvestor;		// 是否资方结算项目
	private String ifCustomer;		// 是否客户结算项目
	private FixedExpense expenseItemId;		// 费用项目ID 父类
	private Supplier supplier;

	public Supplier getSupplier() {
		return supplier;
	}

	public void setSupplier(Supplier supplier) {
		this.supplier = supplier;
	}
	public VehicleSettlementInfo() {
		this(null);
	}


	public VehicleSettlementInfo(FixedExpense expenseItemId){
		this.expenseItemId = expenseItemId;
	}
	
	public String getVehicleSettlementInfoId() {
		return vehicleSettlementInfoId;
	}

	public void setVehicleSettlementInfoId(String vehicleSettlementInfoId) {
		this.vehicleSettlementInfoId = vehicleSettlementInfoId;
	}
	
	@Length(min=0, max=64, message="结算资方长度不能超过 64 个字符")
	public String getInvestor() {
		return investor;
	}

	public void setInvestor(String investor) {
		this.investor = investor;
	}
	
	@Length(min=0, max=1, message="是否资方结算项目长度不能超过 1 个字符")
	public String getIfInvestor() {
		return ifInvestor;
	}

	public void setIfInvestor(String ifInvestor) {
		this.ifInvestor = ifInvestor;
	}
	
	@Length(min=0, max=1, message="是否客户结算项目长度不能超过 1 个字符")
	public String getIfCustomer() {
		return ifCustomer;
	}

	public void setIfCustomer(String ifCustomer) {
		this.ifCustomer = ifCustomer;
	}
	
	public FixedExpense getExpenseItemId() {
		return expenseItemId;
	}

	public void setExpenseItemId(FixedExpense expenseItemId) {
		this.expenseItemId = expenseItemId;
	}
	
}